Skip to main content

revCurrentRecord

Type

function

Summary

Returns the number of the current record in a record set.

Syntax

revCurrentRecord(<recordSetID>)

Description

Use the revCurrentRecord function to find out which record is currently being used.

If the operation is not successful, the revCurrentRecord function returns an error message that begins with the string "revdberr".

If the revCurrentRecord function returns a value of 0, this means that the cursor is at the start of the record set, pointing to the first record. Fetching data (with revDatabaseColumnNamed or revDatabaseColumnNumbered) will retrieve the first record.

If the revCurrentRecord function returns a value of equal to the number of records -1, this means that the cursor is on the last record. Fetching data will retrieve the last record.

Important

The revCurrentRecord command is part of the Database library. To ensure that the command works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure both the "Database" library checkbox and those of the database drivers you are using are checked.

Parameters

NameTypeDescription

recordSetID

The number returned by the revQueryDatabase function when the record set was created.

Examples

revCurrentRecord(bookSearchResults)
put revCurrentRecord(it) into myRecordNumber

library: Database library

command: revMoveToNextRecord

control structure: function

function: revQueryIsAtStart, revdb_movefirst, revdb_moveprev, revdb_movelast, revDatabaseColumnNumbered, revdb_movenext

glossary: LiveCode custom library, Standalone Application Settings, record, standalone application, record set, return

keyword: string

Compatibility and Support

Introduced

LiveCode 1.1

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?